<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/tag.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>公司部门列表</title>
<LINK rel="stylesheet" type="text/css" href="${baseurl}js/easyui/styles/default.css">
<%@ include file="/WEB-INF/views/common_css.jsp"%>
<%@ include file="/WEB-INF/views/common_js.jsp"%>
</head>
<body>
	<form name="itemsForm"
		action="${pageContext.request.contextPath }/user/queryUser"
		method="post">
		<table width="100%" border=1>
					<tr>
						<td>
						<input type="text" name="username" value="请输入部门名称" onfocus="if(this.value==this.defaultValue){this.value=''}" onblur="if(this.value==''){this.value=this.defaultValue}"/>
						<input type="submit" value="查询" /> 
						</td>
						<td>
							<input type="button" value="添加部门" onclick="javascript:createmodalwindow('添加部门',0.43,0.49,'${baseurl}department/add')"/>
						</td>
					</tr>
		</table>
		部门列表：
		<table width="100%" border=1 class="huanse">
			<tr>
				<td>部门名称</td>
				<td>创建日期</td>
				<td>操作</td>
			</tr>
			<c:forEach items="${vDepartments }" var="item">
				<tr>
					<td>${item.departmentName }</td>
					<td><fmt:formatDate value="${item.createtime}"
							pattern="yyyy-MM-dd HH:mm:ss" /></td>
					<td>
						<!-- 有item:update权限才显示修改链接，没有该 权限不显示，相当 于if(hasPermission(item:update)) javascript:addTab2('添加用户','${baseurl}user/add','icon-null')-->
						<shiro:hasPermission name="department:update">
							<a href="javascript:javascript:addTab2('${item.departmentName }','${baseurl}department/edit/${item.departmentId}','icon-null')">编辑岗位</a>
							&nbsp;&nbsp;&nbsp;&nbsp;
							<a href="javascript:createmodalwindow('修改部门名称',0.43,0.49,'${baseurl}department/editName/${item.departmentId}')" >修改部门名称</a>
						</shiro:hasPermission>
					</td>

				</tr>
			</c:forEach>

		</table>
	</form>
</body>
</html>